﻿using System.IO;

namespace VASJ.Common
{
    public class Constants
    {
        public const string BIN_DEBUG = @"\bin\Debug";
        public const string BIN_RELEASE = @"\bin\Release";
        public const string SOLUTION_ITEMS = "SolutionItems";

        // Refer: http://www.microsoft.com/security/portal/mmpc/shared/variables.aspx        
        public const string ALLUSERSPROFILE = "ALLUSERSPROFILE";
        public const string TEMP = "TEMP";
        public const string APPDATA = "APPDATA";
        public const string CommonProgramFiles = "CommonProgramFiles";
        public const string HOMEPATH = "HOMEPATH";
        public const string LOCALAPPDATA = "LOCALAPPDATA";
        public const string ProgramData = "ProgramData";
        public const string ProgramFiles = "ProgramFiles";
        public const string ProgramW6432 = "ProgramW6432";
        public const string PUBLIC = "PUBLIC";
        public const string SystemDrive = "SystemDrive";
        public const string SystemRoot = "SystemRoot";
        public const string USERPROFILE = "USERPROFILE";

        public const string VietnameseSpecialChars = "ĐĂÂÊÔƠƯđăâêôơưăâêôơưáắấéếíóốớúứýàằầèềìòồờùừỳảẳẩđẻểỉỏổởủửỷãẵẫẽễĩõỗỡũữỹạặậẹệịọộợụựỵ";

        public static string PathAllUsersProfile
        {
            get
            {
                try
                {
                    string temp = System.Environment.GetEnvironmentVariable(ALLUSERSPROFILE);
                    return temp;
                }
                catch
                {
                    return string.Empty;
                }
            }
        }
        public static string PathTemp
        {
            get
            {
                try
                {
                    string temp = System.Environment.GetEnvironmentVariable(TEMP);
                    return temp;
                }
                catch
                {
                    return string.Empty;
                }
            }
        }
        public static string PathAppData
        {
            get
            {
                try
                {
                    string temp = System.Environment.GetEnvironmentVariable(APPDATA);
                    return temp;
                }
                catch
                {
                    return string.Empty;
                }
            }
        }
        public static string PathCommonProgramFiles
        {
            get
            {
                try
                {
                    string temp = System.Environment.GetEnvironmentVariable(CommonProgramFiles);
                    return temp;
                }
                catch
                {
                    return string.Empty;
                }
            }
        }
        public static string PathHomePath
        {
            get
            {
                try
                {
                    string temp = System.Environment.GetEnvironmentVariable(HOMEPATH);
                    return temp;
                }
                catch
                {
                    return string.Empty;
                }
            }
        }
        public static string PathLocalAppData
        {
            get
            {
                try
                {
                    string temp = System.Environment.GetEnvironmentVariable(LOCALAPPDATA);
                    return temp;
                }
                catch
                {
                    return string.Empty;
                }
            }
        }
        public static string PathProgramData
        {
            get
            {
                try
                {
                    string temp = System.Environment.GetEnvironmentVariable(ProgramData);
                    return temp;
                }
                catch
                {
                    return string.Empty;
                }
            }
        }
        public static string PathProgramFiles
        {
            get
            {
                try
                {
                    string temp = System.Environment.GetEnvironmentVariable(ProgramFiles);
                    return temp;
                }
                catch
                {
                    return string.Empty;
                }
            }
        }
        public static string PathProgramW6432
        {
            get
            {
                try
                {
                    string temp = System.Environment.GetEnvironmentVariable(ProgramW6432);
                    return temp;
                }
                catch
                {
                    return string.Empty;
                }
            }
        }
        public static string PathPublic
        {
            get
            {
                try
                {
                    string temp = System.Environment.GetEnvironmentVariable(PUBLIC);
                    return temp;
                }
                catch
                {
                    return string.Empty;
                }
            }
        }
        public static string PathSystemDrive
        {
            get
            {
                try
                {
                    string temp = System.Environment.GetEnvironmentVariable(SystemDrive);
                    return temp;
                }
                catch
                {
                    return string.Empty;
                }
            }
        }
        public static string PathSystemRoot
        {
            get
            {
                try
                {
                    string temp = System.Environment.GetEnvironmentVariable(SystemRoot);
                    return temp;
                }
                catch
                {
                    return string.Empty;
                }
            }
        }
        public static string PathUserProfile
        {
            get
            {
                try
                {
                    string temp = System.Environment.GetEnvironmentVariable(USERPROFILE);
                    return temp;
                }
                catch
                {
                    return string.Empty;
                }
            }
        }
        public static string PathCommonLocation
        {
            get
            {
                try
                {
                    return Path.Combine(System.Environment.GetEnvironmentVariable(ALLUSERSPROFILE), COMPANY_NAME);
                }
                catch
                {
                    return string.Empty;
                }
            }
        }

        public const string COMPANY_NAME = "VASJ";
        public const string CONFIGURATION_FILE_NAME = @"\Configuration.xml";
        public const string LANGUAGE_FILE_NAME = @"\Localization.xml";
        public const string MENU_BAR_FILE_NAME = @"\MenuBarButton.xml";
    }
}